<template>
  <div>
    <div class="box">
      <div :class="index==1?'active':''" @click="$goPage('/')">首页</div>
      <div :class="index==2?'active':''" @click="$goPage('/my_book')">我的订单</div>
      <div :class="index==3?'active':''" @click="$goPage('/home')">个人中心</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "BottomBar",
  props: {
    index: Number
  }
}
</script>

<style scoped>
.box {
  width: 100%;
  height: 50px;
  line-height: 50px;
  position: fixed;
  bottom: 0;
  background-color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 14px;
  color: #000000;
  box-shadow: 0 -3px 10px #CCCCCC;
}

.active {
  font-weight: bold;
}
</style>
